/*
 * MyClass.hpp
 *
 *  Created on: Dec 27, 2012
 *      Author: trwulff
 * Basic Template for .hpp class
 */

/*
 * Description:
 */
//#define NO_SHOOTER_MOTORS


#ifndef Shooter_HPP
#define Shooter_HPP
#include <cstdio>
#include "WPILib.h"
#include "time.h"
#include "Constants.hpp"
#include <Solenoid.h>
#include <Timer.h>
#define SHOOTERID1 3
#define SHOOTERID2 2
#define DROP_CYLINDERID 4
#define DROP_CYLINDERID2 5
#define DROP_DELAY .5
#define SHOOTERDELAY .5
#define SHOOTERMOTORID1 5
#define SHOOTERMOTORID2 6
#define SHOOTERLAUNCEDELAY 2
#define P 100
#define I .003
#define D .5
//#define ENCODER_LPR 250


 class Shooter
{
public:
	/*
	 * Default constructor
	 */
	Shooter();
	

	/*
	 * Default destructor
	 */
	void SetSpeed(double);
	void SetSpeed(double Speed1,double Speed2);
	void Launch();
	void Drop(bool State);
	bool HaveShot(UINT8 count);
	UINT8 ShotCount();
	void ResetShotCount();
	void SetShotCount(UINT8 count);
	bool Calibrate();
		
		
	
	~Shooter();
	void Update();
	
// The update function is expected for every class and will be called every 5 ms.
// This function sould contain any motor calls. This will keep the motors functioning.

// Other public functions
protected:

private:
	Solenoid ShooterSolenoid1,ShooterSolenoid2,DropSolenoid,DropSolenoid2;
#ifndef NO_SHOOTER_MOTORS
	CANJaguar ShooterMoter1;
	CANJaguar ShooterMoter2;
#endif
	Timer ShooterTimer;
	Timer LaunchTimer;
	bool shoot ;
	bool launch;
	double motor1Speed  ;
	double motor2Speed ;
	double ShooterDelay;
	double LaunchDelay;
	double DropDelay;
	UINT8 ShotCounter;
	bool ShotCountFlg;

};
#endif
